package com.suny.exception;

/**
 * 业务异常
 */
public class BusinessException extends RuntimeException {
    
    private static final long serialVersionUID = 1L;
    
    private String message;
    private String code;
    
    public BusinessException(String message) {
        super(message);
        this.message = message;
    }
    
    public BusinessException(String message, String code) {
        super(message);
        this.message = message;
        this.code = code;
    }
    
    public BusinessException(String message, Throwable e) {
        super(message, e);
        this.message = message;
    }
    public BusinessException(String message, String code, Throwable e) {
        super(message, e);
        this.message = message;
        this.code = code;
        this.setStackTrace(e.getStackTrace());
    }
    
    @Override
    public String getMessage() {
        return message;
    }
    public String getCode() {
        return code;
    }
} 